package com.atguigu.tingshu.album.client;

import com.atguigu.tingshu.model.album.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/***
 * 专辑微服务提供的Feign接口
 * 谁被调就写谁
 */


@FeignClient(name = "service-album",path = "/client/album/albumInfo")
public interface AlbumClientFeign {


    /**
     * 获取三级分类前七名
     *
     * @param categoryId1
     * @return
     */
    @GetMapping(value = "/findTopCategory3/{categoryId1}")
    public List<BaseCategory3> findTopCategory3(@PathVariable(value = "categoryId1") Long categoryId1);

    /**
     * 获取专辑数据
     * @param albumId
     * @return
     */
    @GetMapping(value = "/getAlbumInfo/{albumId}")
    AlbumInfo getAlbumInfo(@PathVariable(value = "albumId") Long albumId);


    /**
     * 一二三级分类数据
     * @param category3Id
     * @return
     */
    @GetMapping(value = "/getBaseCategoryView/{category3Id}")
    public BaseCategoryView getBaseCategoryView(@PathVariable(value = "category3Id") Long category3Id);

    /**
     * 获取专辑统计数据
     * @param albumId
     * @return
     */
    @GetMapping("/getAlbumStatMap{albumId}")
    Map<String,Object> getAlbumInfoStat(@PathVariable(value = "albumId") Long albumId);

    /**
     * 获取专辑标签
     * @param albumId
     * @return
     */
    @GetMapping("/getAlbumInfoAttributeList/{albumId}")
    List<AlbumAttributeValue> getAlbumInfoAttributeList(@PathVariable(value = "albumId") Long albumId);

    /**
     * 获取声音信息
     * @param trackId
     * @return
     */
    @GetMapping("/getTrackInfo/{trackId}")
    public TrackInfo getTrackInfo(@PathVariable(value = "trackId")Long trackId);


    /**
     * 判断用户是否可以评论该声音
     * @param param
     */
    @GetMapping("/isCanComment")
    Boolean isCanComment(@RequestParam Map<String,Long>param);

}